﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Vmago.Models
{
    public class RepositoryScence:IStageShop
    {
        private StageShopDataContext ds;

        public RepositoryScence()
        {
            ds = new StageShopDataContext();
        }

        public RepositoryScence( StageShopDataContext d)
        {
            ds = d;
        }

        #region IStageShop Members

        public IEnumerable<Scence> getScenceList()
        {
            IEnumerable<Scence> c = from p in ds.Scences
                                    select p;

            return c;
        }

        public  int updateScenceList( Scence sen)
        {
             int? id; 
             id = sen.ID;
             int r = 0;

             ds.LatLongUpdate(id, sen.@long, sen.lat);
             
             
             return r;
        }

        #endregion 
    }
}
